﻿

namespace StockUI
{
    public static class CommonHelper
    {
        public static string StringSub(this string str,int length,bool suffix=false)
        {
            if (string.IsNullOrEmpty(str)) return str;
            return str.Length <= length ? str : (str.Substring(0, length) + (suffix ? "..." : ""));
        }
    }
}
